import request from "@/utils/request";

// 查询章节列表
export function listChapter(query) {
  return request({
    url: "/system/chapter/list",
    method: "get",
    params: query
  });
}

// 查询章节详细
export function getChapter(id) {
  return request({
    url: "/system/chapter/" + id,
    method: "get"
  });
}

// 新增章节
export function addChapter(data) {
  return request({
    url: "/system/chapter/add",
    method: "post",
    data: data
  });
}

// 修改章节
export function updateChapter(data) {
  return request({
    url: "/system/chapter/edit",
    method: "post",
    data: data
  });
}

// 删除章节
export function delChapter(id) {
  return request({
    url: "/system/chapter/" + id,
    method: "delete"
  });
}


// 查询书法列表
export function listCalligraphy(query) {
  return request({
    url: "/system/calligraphy/file/list",
    method: "get",
    params: query
  });
}

// 查询书法详细
export function getCalligraphy(id) {
  return request({
    url: "/system/calligraphy/file/" + id,
    method: "get"
  });
}

// 新增书法
export function addCalligraphy(data) {
  return request({
    url: "/system/calligraphy/file/add",
    method: "post",
    data: data
  });
}

// 修改书法
export function updateCalligraphy(data) {
  return request({
    url: "/system/calligraphy/file/edit",
    method: "post",
    data: data
  });
}

// 删除书法
export function delCalligraphy(id) {
  return request({
    url: "/system/calligraphy/file/" + id,
    method: "delete"
  });
}



// 查询字帖列表
export function listBookFile(query) {
  return request({
    url: "/system/bookFile/list",
    method: "get",
    params: query
  });
}

// 查询字帖详细
export function getBookFile(id) {
  return request({
    url: "/system/bookFile/" + id,
    method: "get"
  });
}

// 新增字帖
export function addBookFile(data) {
  return request({
    url: "/system/bookFile/add",
    method: "post",
    data: data
  });
}

// 修改字帖
export function updateBookFile(data) {
  return request({
    url: "/system/bookFile/edit",
    method: "post",
    data: data
  });
}

// 删除字帖
export function delBookFile(id) {
  return request({
    url: "/system/bookFile/" + id,
    method: "delete"
  });
}